#include "cameracodestate.h"

CameraCodeState::CameraCodeState(KylinCamera *camera)
{
    cameraCurrent = camera;
    //connect(this,SIGNAL(finished()),this,SLOT(deleteLater()));
}

void CameraCodeState::run()
{
    enum CameraState state;
    while(1)
    {
        state = cameraCurrent->camera_get_state(CAMERA_ENCODE);
        qDebug() << "camera state:" <<state;
        if(state == CAMERA_ENCODE_STOP)
            break;
        QThread::msleep(100);
    }
    emit camerafinish();
}

